package pl.dalkia.services.scanner.services.matcher;

import java.util.regex.Pattern;

public abstract class AbstractConditionLogMatcher implements Matchable {

	protected Pattern pattern;

	
	public AbstractConditionLogMatcher(String pattern) {
		super();
		this.pattern = Pattern.compile(pattern);
	}

	protected boolean isReadyForMatching(String input) {
		return (input != null && !input.equals(""));
	}

	@Override
	public String getPattern() {
		return pattern.pattern();
	}
}